<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2025/5/4
  Time: 16:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.project.DB_Flight" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%
  String fid = request.getParameter("fid");
  List<String> deleteInput = new ArrayList<>();
  deleteInput.add(fid);

  DB_Flight dbFlight = new DB_Flight();
  boolean deleteResult = dbFlight.delete(deleteInput);

  if (deleteResult) {
    response.sendRedirect("index.jsp");
  } else {
    out.println("删除航班失败");
  }
%>